#FROM registry.cn-hangzhou.aliyuncs.com/acs/maven:3-jdk-8 AS build-env
#FROM openjdk:17-jdk-slim
#COPY ruoyi-admin/target/ruoyi-admin.jar /ruoyi-admin.jar
#COPY powerone-show/src/main/resources/templates /ruoyi/templates
#EXPOSE 8080
#ENTRYPOINT ["java","-jar","/ruoyi-admin.jar","--spring.profiles.active=prod"]
# ===== 第一阶段：生产运行阶段 =====
FROM eclipse-temurin:18-jre-alpine
RUN apk add --no-cache curl netcat-openbsd
WORKDIR /app
COPY app.jar .
# 使用 shell 启动，可以动态解析环境变量
ENTRYPOINT ["java", "-jar", "app.jar"]
